<template>
	<div style="border:1px solid blue;margin: 5px; ">
		<h2>Two</h2>
		<h3>val:{{val}}</h3>
		<h3>str:{{str}}</h3>
	</div>
</template>

<script>
	import {inject} from 'vue'
	export default{
		setup(){
			const val = inject('globalVal');
			//inject遵循就近原则
			const str = inject('globalOne');
			
			return{
				val,str
			}
		}
	}
</script>

<style>
</style>
